﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Linq;
using System.Net;
using System.IO;

namespace TheOutLetLibrary.Dominio {

    public static class APIKanlo {

        public static XElement CarregaXml(string complementoURI) {
            WebClient wc = new WebClient();
            wc.Credentials = new NetworkCredential("newton@newton", "newton123");
            wc.DownloadFile("https://checkout.theoutlet.com.br/commerce-api/api/" + complementoURI,
                "c:\\totlet_apoio\\arq.xml");
            return XElement.Load("c:\\totlet_apoio\\arq.xml");
        }

    }
}
